home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 17 / Hot Mix 17.iso / HM17_SGI / research / examples / doc / sigprc05 < prev    next >
Text File  |  1997-07-08  |  513b  |  16 lines

  1. ; This batch file creates a plot of the power spectrum 
  2. ; of the simulated signal used in the example from Chapter 13,
  3. ; "Signal Processing", of _Using IDL_.
  4.  
  5. @sigprc01.bat ; compute time data sequence u
  6.  
  7. V = FFT(U) ; compute spectrum v
  8.  
  9. F = FINDGEN(N/2+1) / (N*delt) ; f = [0.0, 1.0/(N*delt), ... , 1.0/(2.0*delt)]
  10.  
  11. ; log-log plot of power spectrum
  12.  
  13. PLOT, F, ABS(V(0:N/2))^2, YTITLE='Power Spectrum of u(k)', $
  14.     /YLOG, XTITLE='Frequency in cycles / second', /XLOG, $
  15.     XRANGE=[1.0,1.0/(2.0*delt)], XSTYLE=1
  16.